from core.base import BaseProtocal;

class ProtocalTypes:
    GetCompany = 1
    GetProjects = 2
    GetProjectEmployees = 3
    GetDeliveries = 4
    GetDeliveryDishes = 5
    AddProject = 6
    
    PushCompany = 1001
    PushProjects = 1002
    PushProjectEmployees = 1003
    PushDeliveries = 1004
    PushDeliveryDishes = 1005
    PushProject = 1006

class GetCompanyMessage(BaseProtocal):

    def __init__(self):
        BaseProtocal.__init__(self,ProtocalTypes.GetCompany)

    def read(self,data):
        pass

class GetProjectsMessage(BaseProtocal):
    
    def __init__(self):
        BaseProtocal.__init__(self,ProtocalTypes.GetProjects)

    def read(self,data):
        self.companyId = data

class GetEmployeesMessage(BaseProtocal):
    
    def __init__(self):
        BaseProtocal.__init__(self,ProtocalTypes.GetProjectEmployees)

    def read(self,data):
        self.projectId = data
        
class GetDeliveriesMessage(BaseProtocal):
    
    def __init__(self):
        BaseProtocal.__init__(self, ProtocalTypes.GetDeliveries)
            
    def read(self,data):
        pass
    
class GetDishesMessage(BaseProtocal):
    
    def __init__(self):
        BaseProtocal.__init__(self, ProtocalTypes.GetDeliveryDishes)
        
    def read(self,data):
        self.deliveryId = data
        
class AddProjectMessage(BaseProtocal):
    
    def __init__(self):
        BaseProtocal.__init__(self, ProtocalTypes.AddProject);
    
    def read(self,data):
        self.projectName = data['projectName'];
        self.projectIntro = data['projectIntro'];